<?php get_header();?>
<!--主要内容 -->
<div id="content-article">
	<div class="container">
		<div class="row row233">
			<div class="col-sm-12 col-md-8 col-lg-8 cont-left" style="width: 100%;">
				<!--文章内容开始left -->
				<?php if(have_posts()): ?>
				<?php while(have_posts()):the_post();  ?>
				<div class="article-left-btn-group">
					<ul>
						<li>
						<a href="http://service.weibo.com/share/share.php?url=<?php the_permalink(); ?>&amp;title=<?php the_title_attribute(); ?>&amp;" class="long-weibo" target="_blank">
						<i class="icon icon-article icon-article-wb js-weibo js-share-article" data-location="article" data-f="pc-weibo-article"></i>
						</a>
						</li>
						<li class="weixin" data-f="pc-friends-article">
						<div class="weixin-Qr-code" style="opacity: 1; margin-left: 70px; display: none;">
							<img src="https://pan.baidu.com/share/qrcode?w=300&h=300&url=<?php the_permalink(); ?>">
						</div>
						<a><i class="icon icon-article icon-article-pyq"></i></a>
						</li>
						<li>
						<a target="_blank" rel="nofollow" href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<?php the_permalink(); ?>&amp;title=<?php the_title_attribute(); ?>&amp;" title="分享到QQ空间">
						<i class="icon icon-article icon-article-qzone js-qzone js-share-article" data-location="article" data-f="pc-qzone-article"></i>
						</a>
						</li>
						<li>
						<a href="#comments">
						<i class="icon icon-article icon-article-pl">评论</i></a>
						</li>
					</ul>
				</div>
				<div id="detail-article">
					<!--后台添加文章标题和作者开始 -->
					<div class="da-title">
					<?php if (ztmao('ztmao_ad_single') != '') { ?>
						<?php echo ztmao('ztmao_ad_single_url'); ?>
					<?php } ?>
						<h2><?php the_title_attribute(); ?></h2>
					</div>
					<div class="article-author">
					<?php  
						if( !is_category() ) {
							$category = get_the_category();
						if($category[0]){
					echo '<a href="'.get_category_link($category[0]->term_id ).'" class="column-link"># '.$category[0]->cat_name.'</a>';
						}
						};
					?>
						<span class="article-time" style="margin-left: 0px;"><i class="iconfont icon-shijian"></i> <?php the_date('Y-m-d H:i'); ?></span>
						<?php if (ztmao('list-comment') != '') { ?>
						<span class="article-pl"><i class="iconfont icon-pinglun"></i> <?php echo get_post($post->ID)->comment_count; ?></span>
						<?php } ?>
						<?php if (ztmao('list-liulan') != '') { ?>
						<span class="article-time liulan"><i class="iconfont icon-faxian"></i> <?php post_views('',''); ?></span>
						<?php } ?>
						<?php   $custom_fields = get_post_custom_keys($post->ID);if (!in_array ('laiyuan_value', $custom_fields)) : ?>
						<span class="article-time">来源： <a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></span>
		   				<?php else: ?>
	       				<?php  $custom = get_post_custom($post->ID);	$custom_value = $custom['laiyuan_value']; ?>
						来源： <?php echo get_post_meta($post->ID,"laiyuan_value",true);?>
	        			<?php endif; ?>
	        			<?php edit_post_link('[编辑]'); ?>

						
					</div>
					<!--后台添加文章标题和作者结束 -->
					<!--后台添加文章信息内容开始 -->
					<div class="data-article">
						<?php the_content(); ztmao_link_pages('before=<div id="page">&after=&next_or_number=next&previouspagelink=上一页&nextpagelink=');  ztmao_link_pages('before=&after='); ztmao_link_pages('before=&after=</div>&next_or_number=next&previouspagelink=&nextpagelink=下一页'); ?>
			<div class="Qr-code">
				<?php if( ztmao('post_like') ) { ?>	
			    <span class="like">
				<?php wp_postlike();?> 
				</span>
				<?php } ?>
			<?php if( ztmao('post_dashang') ) { ?>	
			<div class="footer-icon-list js-qr-ds">
			<a href="javascript:">
			<li class="Qr-code-footer">
			<div class="app-qrcode dashang">
				<img src="<?php echo ztmao('post_dashang_img'); ?>">
			</div>
			打赏
			</li>
			</a>
			</div>
			<?php } ?>
			</div>
						<div class="tag-box ">
							<?php the_tags('', ' ', ''); ?>
						</div>
						<!--评论开始-->
						<?php comments_template( '', true ); ?>
					</div>
					<!--相关文章 -->
				<?php include( 'parts/related.php' ); ?>
				</div>
				<?php endwhile;  endif; ?>
				<!--文章内容结束 -->
			</div>
		</div>
	</div>
</div>
<!--底部 -->
<div class="go-top0" id="gotopbtn">
	<i class="icon icon-top"></i>
</div>
<?php get_footer();?>